from transformers import pipeline
from transformers import AutoTokenizer,AutoModelForSequenceClassification

new_model = AutoModelForSequenceClassification.from_pretrained(r"D:\Code\sshcode\HuggingFace\output\checkpoint-210")
new_tokenizer = AutoTokenizer.from_pretrained(r"D:\Code\sshcode\HuggingFace\output\checkpoint-210")
pipe = pipeline("text-classification",model=new_model,tokenizer=new_tokenizer,device=0)
res = pipe("这个酒店的环境真好")
print(res)